<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>papyros.distributed</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="papyros-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Papyros API documentation</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="papyros-module.html">Package&nbsp;papyros</a> ::
        Module&nbsp;distributed
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="papyros.distributed-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="papyros.distributed-module.html">Module papyros.distributed</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">'''A multiprocess implementation of the papyros master-slave API.</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">Both the master and the slaves run as separate processes on one or more machines.</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">This module is also executable, spawning the master or slave processes. Run as::</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">    python -m papyros.distributed --help</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">to see the list of available options.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">@requires: U{Pyro &lt;http://pyro.sourceforge.net/&gt;}.</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'DistributedMaster'</tt><tt class="py-op">,</tt> <tt class="py-string">'DistributedSlave'</tt><tt class="py-op">,</tt> <tt class="py-string">'DEFAULT_GROUP'</tt><tt class="py-op">]</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">time</tt> <tt class="py-keyword">import</tt> <tt class="py-name">sleep</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">subprocess</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Popen</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">optparse</tt> <tt class="py-keyword">import</tt> <tt class="py-name">OptionParser</tt><tt class="py-op">,</tt> <tt class="py-name">make_option</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">Pyro</tt><tt class="py-op">.</tt><tt class="py-name">core</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ObjBase</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">Pyro</tt><tt class="py-op">.</tt><tt class="py-name">configuration</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Config</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">Pyro</tt><tt class="py-op">.</tt><tt class="py-name">errors</tt> <tt class="py-keyword">import</tt> <tt class="py-name">NamingError</tt><tt class="py-op">,</tt> <tt class="py-name">ConnectionClosedError</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package papyros=papyros-module.html"><a title="papyros" class="py-name" href="#" onclick="return doclink('link-0', 'papyros', 'link-0');">papyros</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Class papyros.Master=papyros.Master-class.html"><a title="papyros.Master" class="py-name" href="#" onclick="return doclink('link-1', 'Master', 'link-1');">Master</a></tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name" targets="Class papyros.Slave=papyros.Slave-class.html"><a title="papyros.Slave" class="py-name" href="#" onclick="return doclink('link-2', 'Slave', 'link-2');">Slave</a></tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Function papyros.enableLogging()=papyros-module.html#enableLogging"><a title="papyros.enableLogging" class="py-name" href="#" onclick="return doclink('link-3', 'enableLogging', 'link-3');">enableLogging</a></tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-4" class="py-name"><a title="papyros" class="py-name" href="#" onclick="return doclink('link-4', 'papyros', 'link-0');">papyros</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Module papyros.simplepyro=papyros.simplepyro-module.html"><a title="papyros.simplepyro" class="py-name" href="#" onclick="return doclink('link-5', 'simplepyro', 'link-5');">simplepyro</a></tt> <tt class="py-keyword">import</tt> <tt id="link-6" class="py-name" targets="Function papyros.simplepyro.publish_object()=papyros.simplepyro-module.html#publish_object"><a title="papyros.simplepyro.publish_object" class="py-name" href="#" onclick="return doclink('link-6', 'publish_object', 'link-6');">publish_object</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Function papyros.simplepyro.get_proxy()=papyros.simplepyro-module.html#get_proxy"><a title="papyros.simplepyro.get_proxy" class="py-name" href="#" onclick="return doclink('link-7', 'get_proxy', 'link-7');">get_proxy</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Function papyros.simplepyro.serve_forever()=papyros.simplepyro-module.html#serve_forever"><a title="papyros.simplepyro.serve_forever" class="py-name" href="#" onclick="return doclink('link-8', 'serve_forever', 'link-8');">serve_forever</a></tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable papyros.distributed.DEFAULT_GROUP=papyros.distributed-module.html#DEFAULT_GROUP"><a title="papyros.distributed.DEFAULT_GROUP" class="py-name" href="#" onclick="return doclink('link-9', 'DEFAULT_GROUP', 'link-9');">DEFAULT_GROUP</a></tt> <tt class="py-op">=</tt> <tt class="py-string">':Papyros'</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable papyros.distributed.log=papyros.distributed-module.html#log,Variable papyros.log=papyros-module.html#log,Variable papyros.multithreaded.log=papyros.multithreaded-module.html#log"><a title="papyros.distributed.log
papyros.log
papyros.multithreaded.log" class="py-name" href="#" onclick="return doclink('link-10', 'log', 'link-10');">log</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">'papyros'</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
<a name="DistributedMaster"></a><div id="DistributedMaster-def"><a name="L37"></a><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="DistributedMaster-toggle" onclick="return toggle('DistributedMaster');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="papyros.distributed.DistributedMaster-class.html">DistributedMaster</a><tt class="py-op">(</tt><tt class="py-base-class">ObjBase</tt><tt class="py-op">,</tt> <tt class="py-base-class">Master</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedMaster-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="DistributedMaster-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"> </tt>
<a name="DistributedMaster.__new__"></a><div id="DistributedMaster.__new__-def"><a name="L39"></a><tt class="py-lineno"> 39</tt> <a class="py-toggle" href="#" id="DistributedMaster.__new__-toggle" onclick="return toggle('DistributedMaster.__new__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="papyros.distributed.DistributedMaster-class.html#__new__">__new__</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-param">group_name</tt><tt class="py-op">=</tt><tt id="link-11" class="py-name"><a title="papyros.distributed.DEFAULT_GROUP" class="py-name" href="#" onclick="return doclink('link-11', 'DEFAULT_GROUP', 'link-9');">DEFAULT_GROUP</a></tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwds</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedMaster.__new__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistributedMaster.__new__-expanded"><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> <tt id="link-12" class="py-name"><a title="papyros.simplepyro.get_proxy" class="py-name" href="#" onclick="return doclink('link-12', 'get_proxy', 'link-7');">get_proxy</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Class Method papyros.distributed.DistributedMaster.name()=papyros.distributed.DistributedMaster-class.html#name"><a title="papyros.distributed.DistributedMaster.name" class="py-name" href="#" onclick="return doclink('link-13', 'name', 'link-13');">name</a></tt><tt class="py-op">(</tt><tt class="py-name">group_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-comment">##, with_attrs=True)</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">NamingError</tt><tt class="py-op">,</tt> <tt class="py-name">ex</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-14" class="py-name" targets="Class papyros.distributed.DistributedMaster=papyros.distributed.DistributedMaster-class.html"><a title="papyros.distributed.DistributedMaster" class="py-name" href="#" onclick="return doclink('link-14', 'DistributedMaster', 'link-14');">DistributedMaster</a></tt><tt class="py-op">,</tt><tt class="py-name">cls</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Static Method papyros.distributed.DistributedMaster.__new__()=papyros.distributed.DistributedMaster-class.html#__new__"><a title="papyros.distributed.DistributedMaster.__new__" class="py-name" href="#" onclick="return doclink('link-15', '__new__', 'link-15');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt> <tt class="py-name">group_name</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">                                                        <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwds</tt><tt class="py-op">)</tt> </tt>
</div><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"> </tt>
<a name="DistributedMaster.__init__"></a><div id="DistributedMaster.__init__-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="DistributedMaster.__init__-toggle" onclick="return toggle('DistributedMaster.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="papyros.distributed.DistributedMaster-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group_name</tt><tt class="py-op">=</tt><tt id="link-16" class="py-name"><a title="papyros.distributed.DEFAULT_GROUP" class="py-name" href="#" onclick="return doclink('link-16', 'DEFAULT_GROUP', 'link-9');">DEFAULT_GROUP</a></tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwds</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedMaster.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistributedMaster.__init__-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">ObjBase</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method papyros.Job.__init__()=papyros.Job-class.html#__init__,Method papyros.Master.__init__()=papyros.Master-class.html#__init__,Method papyros.Slave.__init__()=papyros.Slave-class.html#__init__,Method papyros.distributed.DistributedMaster.__init__()=papyros.distributed.DistributedMaster-class.html#__init__,Method papyros.distributed.DistributedSlave.__init__()=papyros.distributed.DistributedSlave-class.html#__init__,Method papyros.multithreaded.MultiThreadedMaster.__init__()=papyros.multithreaded.MultiThreadedMaster-class.html#__init__,Method papyros.multithreaded.MultiThreadedSlave.__init__()=papyros.multithreaded.MultiThreadedSlave-class.html#__init__,Method papyros.singlethreaded.SingleThreadedMaster.__init__()=papyros.singlethreaded.SingleThreadedMaster-class.html#__init__"><a title="papyros.Job.__init__
papyros.Master.__init__
papyros.Slave.__init__
papyros.distributed.DistributedMaster.__init__
papyros.distributed.DistributedSlave.__init__
papyros.multithreaded.MultiThreadedMaster.__init__
papyros.multithreaded.MultiThreadedSlave.__init__
papyros.singlethreaded.SingleThreadedMaster.__init__" class="py-name" href="#" onclick="return doclink('link-17', '__init__', 'link-17');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt id="link-18" class="py-name"><a title="papyros.Master" class="py-name" href="#" onclick="return doclink('link-18', 'Master', 'link-1');">Master</a></tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="papyros.Job.__init__
papyros.Master.__init__
papyros.Slave.__init__
papyros.distributed.DistributedMaster.__init__
papyros.distributed.DistributedSlave.__init__
papyros.multithreaded.MultiThreadedMaster.__init__
papyros.multithreaded.MultiThreadedSlave.__init__
papyros.singlethreaded.SingleThreadedMaster.__init__" class="py-name" href="#" onclick="return doclink('link-19', '__init__', 'link-17');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwds</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt id="link-20" class="py-name"><a title="papyros.simplepyro.publish_object" class="py-name" href="#" onclick="return doclink('link-20', 'publish_object', 'link-6');">publish_object</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="papyros.distributed.DistributedMaster.name" class="py-name" href="#" onclick="return doclink('link-21', 'name', 'link-13');">name</a></tt><tt class="py-op">(</tt><tt class="py-name">group_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line"> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">classmethod</tt> </tt>
<a name="DistributedMaster.name"></a><div id="DistributedMaster.name-def"><a name="L51"></a><tt class="py-lineno"> 51</tt> <a class="py-toggle" href="#" id="DistributedMaster.name-toggle" onclick="return toggle('DistributedMaster.name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="papyros.distributed.DistributedMaster-class.html#name">name</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-param">group_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedMaster.name-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistributedMaster.name-expanded"><a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">group_name</tt> <tt class="py-op">+</tt> <tt class="py-string">'.Master'</tt> </tt>
</div></div><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"> </tt>
<a name="DistributedSlave"></a><div id="DistributedSlave-def"><a name="L55"></a><tt class="py-lineno"> 55</tt> <a class="py-toggle" href="#" id="DistributedSlave-toggle" onclick="return toggle('DistributedSlave');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="papyros.distributed.DistributedSlave-class.html">DistributedSlave</a><tt class="py-op">(</tt><tt class="py-base-class">ObjBase</tt><tt class="py-op">,</tt> <tt class="py-base-class">Slave</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedSlave-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="DistributedSlave-expanded"><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="DistributedSlave.__init__"></a><div id="DistributedSlave.__init__-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="DistributedSlave.__init__-toggle" onclick="return toggle('DistributedSlave.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="papyros.distributed.DistributedSlave-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group_name</tt><tt class="py-op">=</tt><tt id="link-22" class="py-name"><a title="papyros.distributed.DEFAULT_GROUP" class="py-name" href="#" onclick="return doclink('link-22', 'DEFAULT_GROUP', 'link-9');">DEFAULT_GROUP</a></tt><tt class="py-op">,</tt> <tt class="py-param">poll_time</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedSlave.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistributedSlave.__init__-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">ObjBase</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="papyros.Job.__init__
papyros.Master.__init__
papyros.Slave.__init__
papyros.distributed.DistributedMaster.__init__
papyros.distributed.DistributedSlave.__init__
papyros.multithreaded.MultiThreadedMaster.__init__
papyros.multithreaded.MultiThreadedSlave.__init__
papyros.singlethreaded.SingleThreadedMaster.__init__" class="py-name" href="#" onclick="return doclink('link-23', '__init__', 'link-17');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt id="link-24" class="py-name"><a title="papyros.Slave" class="py-name" href="#" onclick="return doclink('link-24', 'Slave', 'link-2');">Slave</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="papyros.Job.__init__
papyros.Master.__init__
papyros.Slave.__init__
papyros.distributed.DistributedMaster.__init__
papyros.distributed.DistributedSlave.__init__
papyros.multithreaded.MultiThreadedMaster.__init__
papyros.multithreaded.MultiThreadedSlave.__init__
papyros.singlethreaded.SingleThreadedMaster.__init__" class="py-name" href="#" onclick="return doclink('link-25', '__init__', 'link-17');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">poll_time</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_master_name</tt> <tt class="py-op">=</tt> <tt id="link-26" class="py-name"><a title="papyros.distributed.DistributedMaster" class="py-name" href="#" onclick="return doclink('link-26', 'DistributedMaster', 'link-14');">DistributedMaster</a></tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="papyros.distributed.DistributedMaster.name" class="py-name" href="#" onclick="return doclink('link-27', 'name', 'link-13');">name</a></tt><tt class="py-op">(</tt><tt class="py-name">group_name</tt><tt class="py-op">)</tt> </tt>
</div><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"> </tt>
<a name="DistributedSlave.run"></a><div id="DistributedSlave.run-def"><a name="L62"></a><tt class="py-lineno"> 62</tt> <a class="py-toggle" href="#" id="DistributedSlave.run-toggle" onclick="return toggle('DistributedSlave.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="papyros.distributed.DistributedSlave-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DistributedSlave.run-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistributedSlave.run-expanded"><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_master</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_master</tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="papyros.simplepyro.get_proxy" class="py-name" href="#" onclick="return doclink('link-28', 'get_proxy', 'link-7');">get_proxy</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_master_name</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">                    <tt id="link-29" class="py-name"><a title="papyros.distributed.log
papyros.log
papyros.multithreaded.log" class="py-name" href="#" onclick="return doclink('link-29', 'log', 'link-10');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">info</tt><tt class="py-op">(</tt><tt class="py-string">'Connected to master: %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_master</tt><tt class="py-op">.</tt><tt class="py-name">URI</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">NamingError</tt><tt class="py-op">,</tt><tt class="py-name">ex</tt><tt class="py-op">:</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">                    <tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">;</tt> <tt class="py-keyword">continue</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Method papyros.Slave.process()=papyros.Slave-class.html#process"><a title="papyros.Slave.process" class="py-name" href="#" onclick="return doclink('link-30', 'process', 'link-30');">process</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ConnectionClosedError</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">                <tt id="link-31" class="py-name"><a title="papyros.distributed.log
papyros.log
papyros.multithreaded.log" class="py-name" href="#" onclick="return doclink('link-31', 'log', 'link-10');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">'Disconnected from master'</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_master</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div></div><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-name">parser</tt> <tt class="py-op">=</tt> <tt class="py-name">OptionParser</tt><tt class="py-op">(</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-name">description</tt> <tt class="py-op">=</tt> <tt class="py-string">"To start a master process, don't specify the --slave/-s option. "</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">                      <tt class="py-string">"To start N slave processes on this host, give --slave=N."</tt><tt class="py-op">,</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-name">option_list</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">            <tt class="py-name">make_option</tt><tt class="py-op">(</tt><tt class="py-string">'-s'</tt><tt class="py-op">,</tt> <tt class="py-string">'--slaves'</tt><tt class="py-op">,</tt> <tt class="py-name">type</tt><tt class="py-op">=</tt><tt class="py-string">'int'</tt><tt class="py-op">,</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'Number of new slaves to spawn'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-name">make_option</tt><tt class="py-op">(</tt><tt class="py-string">'-g'</tt><tt class="py-op">,</tt> <tt class="py-string">'--group'</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt id="link-32" class="py-name"><a title="papyros.distributed.DEFAULT_GROUP" class="py-name" href="#" onclick="return doclink('link-32', 'DEFAULT_GROUP', 'link-9');">DEFAULT_GROUP</a></tt><tt class="py-op">,</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">                        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'Name of the Pyro process group'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">            <tt class="py-name">make_option</tt><tt class="py-op">(</tt><tt class="py-string">'-c'</tt><tt class="py-op">,</tt> <tt class="py-string">'--config'</tt><tt class="py-op">,</tt> <tt class="py-name">metavar</tt><tt class="py-op">=</tt><tt class="py-string">'FILE'</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'Pyro configuration file'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt class="py-name">make_option</tt><tt class="py-op">(</tt><tt class="py-string">'-l'</tt><tt class="py-op">,</tt> <tt class="py-string">'--logging'</tt><tt class="py-op">,</tt> <tt class="py-name">action</tt><tt class="py-op">=</tt><tt class="py-string">'store_true'</tt><tt class="py-op">,</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                        <tt class="py-name">help</tt><tt class="py-op">=</tt><tt class="py-string">'Print out logging messages'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">    <tt class="py-name">options</tt> <tt class="py-op">=</tt> <tt class="py-name">parser</tt><tt class="py-op">.</tt><tt class="py-name">parse_args</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">logging</tt><tt class="py-op">:</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt id="link-33" class="py-name"><a title="papyros.enableLogging" class="py-name" href="#" onclick="return doclink('link-33', 'enableLogging', 'link-3');">enableLogging</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">:</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">config</tt> <tt class="py-op">=</tt> <tt class="py-name">Config</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-name">config</tt><tt class="py-op">.</tt><tt class="py-name">setup</tt><tt class="py-op">(</tt><tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">slaves</tt><tt class="py-op">:</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-name">master</tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="papyros.distributed.DistributedMaster" class="py-name" href="#" onclick="return doclink('link-34', 'DistributedMaster', 'link-14');">DistributedMaster</a></tt><tt class="py-op">(</tt><tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">)</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-name">master</tt><tt class="py-op">.</tt><tt class="py-name">URI</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">            <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-name">master</tt><tt class="py-op">.</tt><tt class="py-name">getProxy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">URI</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-string">'Starting master of group "%s" at %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">,</tt><tt class="py-name">uri</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">            <tt id="link-35" class="py-name"><a title="papyros.simplepyro.serve_forever" class="py-name" href="#" onclick="return doclink('link-35', 'serve_forever', 'link-8');">serve_forever</a></tt><tt class="py-op">(</tt><tt class="py-name">disconnect</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-string">'Master of group "%s" is already started and listening at %s!'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">                <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">,</tt> <tt class="py-name">uri</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">slaves</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-name">cmd</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'python'</tt><tt class="py-op">,</tt> <tt class="py-string">'-m'</tt><tt class="py-op">,</tt> <tt class="py-string">'papyros.distributed'</tt><tt class="py-op">,</tt> <tt class="py-string">'--slaves=1'</tt><tt class="py-op">,</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                   <tt class="py-string">'--group=%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">]</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">:</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                <tt class="py-name">cmd</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'--config=%s'</tt> <tt class="py-op">%</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">config</tt><tt class="py-op">)</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">logging</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                <tt class="py-name">cmd</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'--logging'</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">n</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">slaves</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                <tt class="py-name">Popen</tt><tt class="py-op">(</tt><tt class="py-name">cmd</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-keyword">print</tt> <tt class="py-string">'Starting slave process (PID=%s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">getpid</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt id="link-36" class="py-name" targets="Class papyros.distributed.DistributedSlave=papyros.distributed.DistributedSlave-class.html"><a title="papyros.distributed.DistributedSlave" class="py-name" href="#" onclick="return doclink('link-36', 'DistributedSlave', 'link-36');">DistributedSlave</a></tt><tt class="py-op">(</tt><tt class="py-name">options</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method papyros.Slave.run()=papyros.Slave-class.html#run,Method papyros.distributed.DistributedSlave.run()=papyros.distributed.DistributedSlave-class.html#run"><a title="papyros.Slave.run
papyros.distributed.DistributedSlave.run" class="py-name" href="#" onclick="return doclink('link-37', 'run', 'link-37');">run</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="papyros-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Papyros API documentation</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Sun Jun 10 22:21:42 2007
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
